const express = require("express");
const router = express.Router();
const { getCapthcaSvg } = require("../services/captchaServices");

router.get("/", (req, res, next) => {
    const captcha = getCapthcaSvg();
    req.session.captcha = captcha.text;
    res.type('svg');
    res.status(200).send(captcha.data);
})

module.exports = router;